home *** CD-ROM | disk | FTP | other *** search
/ Spidla DivX / DivX.bin / CatDV Pro 3.0.8 / lib / parser.jar / org / xml / sax / helpers / ParserFactory.class (.txt) < prev   
Encoding:
Java Class File  |  2000-02-23  |  1.1 KB  |  26 lines

  1. package org.xml.sax.helpers;
  2.  
  3. import org.xml.sax.Parser;
  4.  
  5. public class ParserFactory {
  6.    private static final String DEFAULT_PARSER = "com.sun.xml.parser.Parser";
  7.  
  8.    private ParserFactory() {
  9.    }
  10.  
  11.    public static Parser makeParser() throws ClassNotFoundException, IllegalAccessException, InstantiationException, NullPointerException, ClassCastException {
  12.       String var0 = "com.sun.xml.parser.Parser";
  13.  
  14.       try {
  15.          var0 = System.getProperty("org.xml.sax.parser", "com.sun.xml.parser.Parser");
  16.       } catch (SecurityException var1) {
  17.       }
  18.  
  19.       return makeParser(var0);
  20.    }
  21.  
  22.    public static Parser makeParser(String var0) throws ClassNotFoundException, IllegalAccessException, InstantiationException, ClassCastException {
  23.       return (Parser)Class.forName(var0).newInstance();
  24.    }
  25. }
  26.